package com.yhn.registration.remote;

import com.hospital.common.base.Result;
import com.hospital.common.dto.payment.module.OrderCreateDto;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

@Component
public class PaymentFeignFallback implements PaymentFeignClient {
    @Override
    public Result<?> create(OrderCreateDto orderCreateDto) {
        // 吞掉远端异常，返回成功，避免影响挂号流程
        return Result.success();
    }

    @Override
    public Result<?> cancelRegistration(@RequestParam("patientId") Long patientId, @RequestParam("registrationId") Long registrationId) {
        // 降级：认为取消成功，避免影响主流程
        return Result.success();
    }
}


